package com.ctshk.common.model;

import io.swagger.annotations.ApiParam;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.List;

/**
 * @description 公共分页实体类
 * @author 谢诗宏
 * @date 2020/12/28
 */
@Setter
public class PageReq implements Serializable {

    @Getter
    @ApiParam(value = "页数,默认第一页")
	private Integer pageNo = 1;

    @Getter
    @ApiParam(value = "数量,默认每页10条")
    private Integer pageSize = 10;

    @Getter
    @ApiParam(value = "第一次请求的当前时间戳(秒),第一页时可不传或为0,第二页开始")
    private long currentTime = 0L;

    @Getter
    @ApiParam(value = "当前菜单id")
    private Long menuId;

    @Getter
    @ApiParam(value = "拥有数据权限的用户数组",hidden = true)
    private List<Long> dataPermissionUserIds;

    /**
     * 如用原生sql则需要该计算
     */
    /*public Integer getPageNo() {
        return (pageNo - 1) * pageSize;
    }*/

}
